We can let the GPU do its stuff without waiting. The GPU knows what it's
doing.
Which means we now get a lot of time to spend on doing CPU things (read:
we're way better in benchmarks).
The old behavior is safer, so we want to keep it around for debugging.
It can be reenabled with GSK_RENDERING_MODE=sync.
static const GDebugKey gsk_rendering_keys[] = {
{ "geometry", GSK_RENDERING_MODE_GEOMETRY },
{ "shaders", GSK_RENDERING_MODE_SHADERS },
+ { "sync", GSK_RENDERING_MODE_SYNC },
+ { "staging-image", GSK_RENDERING_MODE_STAGING_IMAGE },
};
gboolean
} GskDebugFlags;
typedef enum {
- GSK_RENDERING_MODE_GEOMETRY = 1 << 0,
- GSK_RENDERING_MODE_SHADERS = 1 << 1
+ GSK_RENDERING_MODE_GEOMETRY = 1 << 0,
+ GSK_RENDERING_MODE_SHADERS = 1 << 1,
+ GSK_RENDERING_MODE_SYNC = 1 << 2,
+ GSK_RENDERING_MODE_STAGING_IMAGE = 1 << 3
} GskRenderingMode;
gboolean gsk_check_debug_flags (GskDebugFlags flags);
},
self->fence);
- GSK_VK_CHECK (vkWaitForFences, gdk_vulkan_context_get_device (self->vulkan),
- 1,
- &self->fence,
- VK_TRUE,
- INT64_MAX);
+ if (GSK_RENDER_MODE_CHECK (SYNC))
+ {
+ GSK_VK_CHECK (vkWaitForFences, gdk_vulkan_context_get_device (self->vulkan),
+ 1,
+ &self->fence,
+ VK_TRUE,
+ INT64_MAX);
+ }
}
static void